var SceneMouseRM = function(options) {
	this.ctx = options.ctx;
	this.editor = options.editor;
	this.sceneId = options.sceneId;
	this.globe = options.editor.globe;
	this.isOpen = false;
	this.dIndex;
	return this;
}

SceneMouseRM.prototype.open=function(e){
	let _this=this;
	if(_this.isOpen){
		layer.style(_this.dIndex, {
			left:(e.position.x)+'px',
			top:(e.position.y+35)+'px'
		});
		return;
	}
	
	layer.open({
		id: 'sceneMouseRM',
		type: 1,
		content: $("#sceneMouseRMScript").html(),
		shade: 0,
		closeBtn: 0,
		title:false,
		area: ['132px', '188px'],
		offset: [(e.position.y+35)+'px', (e.position.x)+'px'],	
		success: function(layero, dIndex) {
			_this.dIndex = dIndex;
			_this.isOpen=true;
			$(layero).children('.layui-layer-content').css('overflow', 'hidden');
			$(layero).children('.layui-layer-content').css('background', 'rgba(43,44,47,.8)');
		},
		end: function() { 
			_this.isOpen=false;
			_this.dIndex=null;
		}
	});
	
}

SceneMouseRM.prototype.close=function(){
	let _this=this;
	if(_this.dIndex){
		layer.close(_this.dIndex);
		_this.isOpen=false;
		_this.dIndex=null;
	}
}




